<template>
	<view class="modal-wrap">
		<!-- 弹窗 删除表单提示 -->
		<u-popup :show="show_pop" :overlay="true" mode="center" :closeable="false" :closeOnClickOverlay="true"
			@close="onClose" @open="onOpen" :safeAreaInsetBottom="true" round=16>
			<view class="cus-center-pop-box">
				<view class="pop-title">
					确定取消该地址吗？
				</view>

				<view class="pop-body">
					<view class="tip">
						<view class="tip-text">
							{{cancelTip}}
							<!-- 		支付后30分钟内可免费取消订单
							超过30分钟将收取违约金
							入住前2小时不可取消 -->
						</view>
						<!-- 			<view class="tip-text">
							您当前已超过30分钟
							需要支付违约金，是否还要取消当前订单
						</view> -->
					</view>
				</view>

				<view class="pop-foot">
					<view class="btns flex-between">
						<view class="btn-qx flex-center" @click="show_pop = false">
							取消
						</view>
						<view class="btn-qr flex-center" @click="confrim()">
							确认
						</view>
					</view>
				</view>
			</view>
		</u-popup>

	</view>
</template>


<script>
	export default {
		components: {

		},
		data() {
			return {
				show_pop: false,
				order: {},
				cancelTip: ''
			}
		},
		watch: {

		},
		methods: {
			init(order) {
				let cancelTip = ''
				let order_type = order.order_type || ''
				if (order.order_type == 'hotel') {
					cancelTip = order.CancelTips
				} else if (order.order_type == 'ticket') {
					cancelTip = order.CancelTips
				} else if (order.order_type == 'perform') {
					cancelTip = order.CancelTips
				}else if (order.order_type == 'yan') {
					cancelTip = order.CancelTips
				}

				this.cancelTip = cancelTip;

				this.order = order;
				this.show_pop = true;
			},

			//新增表单
			onClose() {
				this.show_pop = false;
			},

			onOpen() {},
			confrim() {
				this.show_pop = false;
				this.$emit('confirm')
				// uni.$u.throttle(this.confrimFn, 2000, true)
			},
			confrimFn() {
				// this.showLoading()
				// this.$api({
				// 	url: '/qxOrder',
				// 	method: 'post',
				// 	data: {
				// 		id: this.order_select.id
				// 	},
				// }).then(res => {
				// 	this.hideLoading()
				// 	this.$alert(res)
				// 	if (res.code == 200) {
				// 		this.$emit('confirm')
				// 		this.show_pop = false;
				// 	} {

				// 	}
				// })
			}
			////新增表单
		},
	}
</script>

<style lang="scss" scoped>
	// 通用选项弹窗
	.cus-center-pop-box {
		padding: 24rpx;
		padding-top: 60rpx;
		padding-bottom: 60rpx;
		width: 686rpx;
		min-height: 300rpx;
		background: #FFFFFF;
		border-radius: 32rpx;

		.pop-title {

			text-align: center;
			font-weight: bold;
			font-size: 28rpx;
			color: #000000;
		}


		.pop-body {
			margin-top: 30rpx;
			padding: 0 60rpx;

			.tip {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
				line-height: 1.6;
				text-align: center;

				.tip-text {

					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #000000;
					line-height: 1.6;
					text-align: center;

					&+.tip-text {
						margin-top: 20rpx;
					}
				}
			}

		}


		.pop-foot {
			margin-top: 60rpx;

			.btns {

				.btn-qx {
					width: 306rpx;
					height: 80rpx;
					background: #F8F8F8;
					border-radius: 40rpx 40rpx 40rpx 40rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #000000;
				}

				.btn-qr {
					width: 306rpx;
					height: 80rpx;
					background: #CB0011;
					border-radius: 40rpx 40rpx 40rpx 40rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #FFFFFF;

				}
			}

		}
	}

	// 通用选项弹窗
</style>